﻿namespace Microsoft.VisualStudio.TextTemplating.CommandLine
{
    using System;
    using System.Reflection;

    internal class OptionSpecification
    {
        private OptionAttribute attribute;
        private PropertyInfo relatedProperty;

        public OptionSpecification(OptionAttribute attribute, PropertyInfo relatedProperty)
        {
            this.attribute = attribute;
            this.relatedProperty = relatedProperty;
        }

        public Type CollectionType
        {
            get
            {
                return this.attribute.CollectionType;
            }
        }

        public string DefaultValue
        {
            get
            {
                return this.attribute.DefaultValue;
            }
        }

        public string Description
        {
            get
            {
                return this.attribute.Description;
            }
        }

        public bool IsFinalOption
        {
            get
            {
                return this.attribute.IsFinalOption;
            }
        }

        public bool IsMultiValue
        {
            get
            {
                return this.attribute.IsMultipleValue;
            }
        }

        public string OptionName
        {
            get
            {
                return this.attribute.Name;
            }
        }

        public PropertyInfo RelatedProperty
        {
            get
            {
                return this.relatedProperty;
            }
        }

        public OptionValueType ValueType
        {
            get
            {
                return this.attribute.ValueType;
            }
        }
    }
}

